package com.vuej.core;

import com.vuej.exception.VuejException;
import com.vuej.util.VueUtil;

import javax.script.Bindings;

/**
 * 将VueFile对象渲染成html片段，渲染完毕后的回调，错误时，将抛出异常
 * 这个接口也能用lambda表达式构造
 */
public interface ThrowVueFileRenderCallback extends VueFileRenderCallback {


    @Override
    default void onError(Bindings error) {
        throw new VuejException(VueUtil.getMessage(error));
    }
}
